import { createStore } from 'vuex'
import user from './module/user'
import createPersistedstate from 'vuex-persistedstate'
const store = createStore({
    modules: {
        user,
    },
    plugins: [
        createPersistedstate({
            key: 'vuex',
            storage: sessionStorage,
            reducer(state) {
                return {
                    user: state.user,
                };
            },
        })
    ]
})
export default store